
package application;

import thes2sim.*;

public class Sensor {
    
    //type
    final int PERIODIC = 0;
    final int NONPERIODIC = 1;
    //priority
    final int HIGH = 1;
    final int MID = 2;
    final int LOW = 3;
    
    private int type;
    private int priority;

    public Sensor(int type, int priority) {
        this.type = type;
        this.priority = priority;
    }
    
  
    public PDU generatePDU(int simTime) {
        return new PDU(simTime, this.priority);
    }
    
    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }
    
}
